/*
* TFMenu.h
*
* This classvwill represent the the menus shown on the screen.
* 
* Author: Rapid Dojo
* Date: Oct 19, 2007
*/

#ifndef TFMENU_H
#define TFMENU_H

#include "TFConstants.h"

class TFMenu{

public:

	TFMenu();
	~TFMenu();

	TF_MENU_MODE GetMenuMode();
	void SetMenuMode(TF_MENU_MODE menuMode);

    void DestroyMenu();
	int AddMenuItem(void* sprite,unsigned short* palette);
	void AddMenuSelect(void* sprite,unsigned short* palette, int index);
	void ChangeSelected(int direction);
	void ChangeSprite(void* sprite,unsigned short* palette, int index);
	void Display();
	int  GetSelected();
	void SetSelectedElement(int element);
	TF_MENU_OPTION GetSelectedOption();
	
	int  StylusSelect(int x, int y);
	void FadeOut();
    void FadeIn();
	void UpdateScale();
	void HideMenu();
	void ShowMenu();
    
    //public static total menu sprites created
    static int totalMenuSprites;
	
	
private:
	//Used internaly to manage palettes so that user can enter
	//the pallete with the sprite but the menu class will not 
	//create a new palette unless it actually is a new one.
	void SetPalette(unsigned short* pal);
	unsigned short* palettes[10];
	int currentPalette;
	int paletteCount;

	int xCenter;
	int yCurrent;
	int itemCount;
    
	int selectedCurrent;
	int selectorSpriteIndex;

	void SetMenuSelect(int index);

	TF_MENU_MODE _menuMode;
};

#endif
